home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / LORD2B6.ZIP / QUEST.REF < prev    next >
Text File  |  1997-05-18  |  5KB  |  258 lines

  1. ;the random quest stuff is handled in this .ref.. it is fairly complicated
  2. ;so be carefull if you try to change it.. I'm going to be adding more
  3. ;later.
  4.  
  5. @#GETNAME
  6. @do `s01 is `bNo`xname?
  7. @if `p20 is 1 then `s01 is The`xBartender
  8. @if `p20 is 2 then `s01 is Smithy
  9. @if `p20 is 3 then `s01 is Nickabrick
  10. @if `p20 is 4 then `s01 is Selena
  11.  
  12. @#GETPLACE
  13. @do `s03 is `bNo`xplace?
  14. @if `p20 is 1 then `s03 is Greentree
  15. @if `p20 is 2 then `s03 is PortTown
  16. @if `p20 is 3 then `s03 is FlagCity
  17. @if `p20 is 4 then `s03 is BoneTown
  18.  
  19. @#GETITEM
  20. @if `p21 is 1 then `s02 is sack
  21. @if `p21 is 2 then `s02 is satchel
  22. @if `p21 is 3 then `s02 is small`xbag
  23. @if `p21 is 4 then `s02 is letter
  24. @if `p21 is 5 then `s02 is small`xpurse
  25.  
  26.  
  27. @#complete
  28. ;completes quest
  29. @routine getname
  30. @do `s05 is `s01
  31. ;current guys name is in `s05
  32.  
  33. @routine getplace
  34. ;place put in `s03
  35.  
  36. @do `p21 is `p17
  37. @routine getitem
  38. ;item put in `s02
  39.  
  40.  
  41. @show
  42. `r0`c  `r1 `%Speedy delivery! `r0
  43. `\`2  `0"Yes? Can I help you, friend?" `2asks `s05.   
  44.  
  45. `2  `$"Yeah.  Take this `s02 and pay me!"
  46.  
  47. `k  `0"I've been waiting for this!  Thank you, `%`n`0!"
  48.  
  49.   `2You are paid `$$`p16`2! 
  50.  
  51. @
  52. ;reset quest stuff
  53. ;give money
  54. @do money + `p16
  55. ;add one to quests completed var
  56. @do `p18 + 1
  57. @do `p14 is 0
  58. @do `p15 is 0
  59. @do `p16 is 0
  60. @do `p17 is 0
  61. @do `i44 is 0
  62. @do `i45 is 0
  63. @do `i46 is 0
  64. @do `i47 is 0
  65. @do `i48 is 0
  66.  
  67. @if `p32 is 0 then do
  68.   @begin
  69.  ;woah, they delivered the item same day
  70. @do `p20 random 1 1
  71. @if `p20 is 1 then do
  72.   @begin
  73.   @do `p20 random 5 1
  74.  
  75.   @if `p20 is 1 then do
  76.     @begin
  77.     @do `p08 + 1
  78.     @show
  79.   `0QUEST BONUS:  `%One extra charm point!
  80.  
  81.     @end
  82.   @if `p20 is 2 then do
  83.     @begin
  84.     @do `p03 + 3
  85.     @show
  86.   `0QUEST BONUS:  `%Three extra hitpoints!
  87.  
  88.     @end
  89.  
  90.   @if `p20 is 3 then do
  91.     @begin
  92.     @do `p04 + 1
  93.     @show
  94.   `0QUEST BONUS:  `%An extra Muscle Point!
  95.  
  96.     @end
  97.  
  98.   @if `p20 is 4 then do
  99.     @begin
  100.     @do `p04 + 1
  101.     @show
  102.   `0QUEST BONUS:  `%An extra Dodge Point!
  103.  
  104.     @end
  105.  
  106.   @if `p20 is 5 then do
  107.     @begin
  108.     @do `p19 + 1
  109.     @show
  110.   `0QUEST BONUS:  `%A free gem for your troubles!
  111.  
  112.     @end
  113.  
  114.   @end
  115.  @end
  116.  
  117. @show
  118.   `%QUEST COMPLETED.
  119. `\`k
  120. @drawmap
  121. @update
  122.  
  123. @#GETQUEST
  124. ;gets a random quest or completes it.
  125. @do `p26 is `p20
  126.  
  127. @if `p26 is `p15 then do
  128.   @begin
  129.   @run complete
  130.   @end
  131.  
  132. @label tryagain
  133. ;get destination and dest name
  134. @do `p20 random 4 1
  135.  
  136.  
  137. @do `p22 is `p20
  138. @routine GETPLACE
  139. @routine GETNAME
  140. @do `s04 is `s01
  141.  
  142. ;get name of sender
  143. @do `p20 is `p26
  144. @routine GETNAME
  145.  
  146. ;get item
  147. @do `p21 random 5 1
  148. @routine GETITEM
  149.  
  150. ;generate price for doing it
  151.  
  152. @do `p25 random 800 300
  153. @do `p24 is `p18
  154. @do `p24 * 3
  155. @do `p25 + `p24
  156.  
  157. @if `p14 = `p20 then do
  158.   @begin
  159.   @do `p21 is `p17
  160.   @routine GETITEM
  161.   @show
  162. `r0`c  `r1 `%Asking for a job `r0
  163. `\`2  `s01 `2looks suprised.  `0"What are you doing around here? Go
  164.   deliver my `s02!"
  165. `\`k
  166.   @drawmap
  167.   @update
  168.   @closescript
  169.   @end
  170.  
  171.  
  172. @if `p15 > 0 then do
  173.   @begin
  174.   @show
  175. `r0`c  `r1 `%Asking for a job `r0
  176. `\`2  You sort of already have a quest - you will need to complete that
  177.   delivery before you attempt another!
  178. `\`k
  179.   @drawmap
  180.   @update
  181.   @closescript
  182.   @end
  183.  
  184.  
  185.  
  186. @if `p31 < 1 then do
  187.   @begin
  188.   @do `p31 is 0
  189.   @show
  190. `r0`c  `r1 `%Asking for a job `r0
  191. `\`2  `0"Sorry, `%`n`0.  I have nothing for you today, maybe
  192.   tomorrow, ok?" `2`s01 tells you.
  193.  
  194. `2  (only `0`v07`2 quest opportunities per day are allowed)
  195. `\`k
  196.   @drawmap
  197.   @update
  198.   @closescript
  199.   @end
  200.  
  201. ;make sure they don't get a quest to go to where they are
  202. @if `p20 is `p22 then goto tryagain
  203.  
  204.  
  205. @do `p31 - 1
  206.  
  207.  
  208. @show
  209. `r0`c  `r1 `%Asking for a job `r0
  210.  
  211.   `0"Actually, `%`n`0.. there is something you could do."
  212.  
  213.   `2`s01 points to a `0`s02`2 sitting on the table.
  214.  
  215.   `0Would you deliver this to `#`s04`0 in `#`s03`0 for `$$`p25`0?"
  216.  
  217. @do `v01 is 1
  218. @do write
  219. `x`x
  220. @choice
  221. Yes, I accept this quest
  222. Forget it
  223. @if response is 1 then do
  224.   @begin
  225.   @do `p14 is `p20
  226.   @do `p15 is `p22
  227.   @do `p16 is `p25
  228.   @do `p17 is `p21
  229.   @if `p17 is 1 then `i44 + 1
  230.   @if `p17 is 2 then `i45 + 1
  231.   @if `p17 is 3 then `i46 + 1
  232.   @if `p17 is 4 then `i47 + 1
  233.   @if `p17 is 5 then `i48 + 1
  234.   @do `p32 is 0
  235.   @show
  236. `\`\  `2You agree to make the delivery.
  237.  
  238.   `0`s01`2 hands you the `0`s02`2!
  239.  
  240.   `%QUEST STARTED.
  241.  
  242. `k
  243.   @drawmap
  244.   @update
  245.   @end
  246.  
  247. @if response is 2 then do
  248.   @begin
  249.   @show
  250. `\`\  `0"My, but you're a picky one.  Perhaps I'll have something else for
  251.   you to do later."
  252. `\`k
  253.   @drawmap
  254.   @update
  255.   @end
  256.  
  257.  
  258.